﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.ForumCategory>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
צור \ ערוך קטגוריה
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>צור \ ערוך קטגוריה</h2>
 <% using (Html.BeginForm(this.Model == null ? "CreateCategory" : "EditCategory", "Forum", FormMethod.Post, new { enctype = "multipart/form-data"})) {%>
 <%
            if (Model != null)
            {
        %>
        <input type="hidden" name="id" value="<%= Model.id %>" />
        <input type="hidden" name="publish" value="1" />
        <%
            }
        %>
           <fieldset>
            <legend>שדות</legend>
         <p>  <label for="title">כותרת:</label>
                <%= Html.TextBox("title", this.Model == null || this.Model.title == null ? string.Empty : this.Model.title.ToString())%></p>
                <p>
            <label for="description">פירוט</label>
            <%= Html.TextBox("description", this.Model == null || this.Model.description == null ? string.Empty : this.Model.description.ToString())%>
            </p><p>
                <input type="submit" value="שמור" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("חזרה לרשימה", "ListCategory") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
